import {DrawerProps} from 'antd/lib/drawer';
import {SiderProps} from 'antd/lib/layout';
import {IDragModalBoxProps} from '@/components/DraggableModalBox';

export type ToolModules = 'css' | 'layer' | 'image' | 'data' | 'theme' | 'module' | 'events';
export type IManageBoxMode  = 'drawer' | 'modal' | 'sider';

export interface IManageModule {
  type?: ToolModules;
  title?: string;
  mode?: IManageBoxMode;
  enableMini?: boolean;
  drawerProps?: DrawerProps;
  siderProps?: SiderProps;
  modalProps?: IDragModalBoxProps;
  component?: () => Promise<any>;
}


/**
 * 管理菜单枚举
 */
const EnumManageModule: {
  [key in ToolModules]: IManageModule
} = {
  css: {
    type: 'css',
    title: 'CSS样式编辑器',
    mode: 'drawer',
    drawerProps: {},
    component: () => import(/*webpackChunkName: `lazy-cssManage`*/'./CssManage'),
  },
  layer: {
    type: 'layer',
    title: '图层管理',
    mode: 'sider',
    siderProps: {
      width: 150
    },
    component: () => import(/*webpackChunkName: `lazy-layerManage`*/'./LayerManage'),
  },
  image: {
    type: 'image',
    title: '图片管理',
    mode: 'drawer',
    drawerProps: {

    },
    component: () => import(/*webpackChunkName: `lazy-imageManage`*/'./ImageManage'),
  }
}

export default EnumManageModule;
